import { WhisperDto, WhisperList } from '@/types/whisper'
import request from '@/utils/request'
/**
 * 获取弹幕列表
 * @returns
 */
export const queryTreeHole = (): ResponseResult<WhisperList> =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/treeHole/list`,
    method: 'GET'
  })
/**
 *
 * @param data 发射弹幕
 * @returns
 */
export const saveTreeHole = (data: WhisperDto): ResponseDefault =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/treeHole/save`,
    method: 'POST',
    data
  })
